<div class="asciicast-card">
  <a href="<%= Routes.asciicast_path(@conn, :show, @asciicast) %>" class="thumbnail-link">
    <div class="play-button">
      <span class="arrow">
        <svg version="1.1" viewBox="0 0 12 12">
          <path d="M1,0 L11,6 L1,12 Z" />
        </svg>
      </span>
    </div>

    <%= render "_thumbnail.html", asciicast: @asciicast %>
  </a>

  <div class="info">
    <h3>
      <%= link title(@asciicast), to: Routes.asciicast_path(@conn, :show, @asciicast) %>

      <%= if @asciicast.private do %>
        <%= render "_private_badge.html" %>
      <% end %>

      <%= if @asciicast.featured do %>
        <%= render "_featured_badge.html" %>
      <% end %>

      <span class="duration"><%= duration(@asciicast) %></span>
    </h3>

    <span class="author-avatar">
      <%= link to: author_profile_path(@asciicast), title: author_username(@asciicast) do %>
        <%= img_tag author_avatar_url(@asciicast), class: "avatar" %>
      <% end %>
    </span>

    <small>by <%= link author_username(@asciicast), to: author_profile_path(@asciicast) %> <%= if !assigns[:no_created_at] do %><%= time_ago_tag @asciicast.inserted_at %><% end %></small>
  </div>
</div>
